package com.ruoyi.datastatistics.controller;

import com.ruoyi.common.core.domain.Parameter;
import com.ruoyi.common.core.domain.Quaparameter;
import com.ruoyi.common.core.domain.entity.TPeaplegroupVO;
import com.ruoyi.common.core.domain.entity.TPeopleTypeVO;
import com.ruoyi.datastatistics.domain.Itemecountlist;

import com.ruoyi.datastatistics.domain.ItemevalutionVO;
import com.ruoyi.datastatistics.service.ItemForpeopletypeUtil;
import com.ruoyi.datastatistics.service.ItemevaluationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.*;

@RestController
@RequestMapping("/evalution")
public class ItemevaluationController {

    @Autowired
    private ItemevaluationService itemevaluationService;
    @PostMapping("/getItemelist")
    public Map<String,Object> getItemelist(@RequestParam("peoplename")String peoplename){
        return ItemForpeopletypeUtil.getItem(peoplename);
    }
    @PostMapping("/getItemevalution")
    public ItemevalutionVO getItemevalution(@RequestBody Parameter parameter){
        return itemevaluationService.getItemevalution(parameter);
    }
    @PostMapping("/getPeopletypelist")
    public List<TPeopleTypeVO> getPeopletypelist(){
        return itemevaluationService.getPeopletypelist();
    }

    @PostMapping("/getPeoplegroup")
    public List<TPeaplegroupVO> getPeoplegroup(@RequestParam int id){
        return itemevaluationService.getPeoplegroup(id);
    }
    @PostMapping("/getItemecount")
    public Map<String,Object> getItemecount(@RequestBody Quaparameter parameter){
        return itemevaluationService.getItemecount(parameter);
    }
}
